home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270_src.lha / gcc-2.7.0-amiga / config / a29k / unix.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  3KB  |  96 lines

  1. /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU, Unix.
  2.    Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
  3.    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11.  
  12. GNU CC is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU CC; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 59 Temple Place - Suite 330,
  20. Boston, MA 02111-1307, USA.  */
  21.  
  22.  
  23. /* This is mostly the same as a29k.h, except that we define unix instead of
  24.    EPI and define unix-style machine names.  */
  25.  
  26. #include "a29k/a29k.h"
  27.  
  28. /* Set our default target to be the 29050; that is the more interesting chip
  29.    for Unix systems.  */
  30.  
  31. #undef TARGET_DEFAULT
  32. #define TARGET_DEFAULT (1+2+16+128)
  33.  
  34. #undef CPP_PREDEFINES
  35. #define CPP_PREDEFINES "-Dam29k -Da29k -Dam29000 -Asystem(unix) -Acpu(a29k) -Amachine(a29k)"
  36.  
  37. #undef CPP_SPEC
  38. #define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}"
  39.  
  40. /* Use a default linker configuration file.  */
  41. #undef LINK_SPEC
  42. #define LINK_SPEC "-T default.gld%s"
  43.  
  44. /* Define the magic numbers that we recognize as COFF.  */
  45.  
  46. #define MY_ISCOFF(magic) ((magic) == SIPFBOMAGIC || (magic) == SIPRBOMAGIC)
  47.  
  48. /* For some systems, it is best if double-word objects are aligned on a 
  49.    doubleword boundary.  We want to maintain compatibility with MetaWare in
  50.    a29k.h, but do not feel constrained to do so here.  */
  51.  
  52. #undef BIGGEST_ALIGNMENT
  53. #define BIGGEST_ALIGNMENT 64
  54.  
  55. /* Add shared data as a kludge for now.  */
  56.  
  57. #undef ASM_FILE_START
  58. #define ASM_FILE_START(FILE)                    \
  59. { char *p, *after_dir = main_input_filename;            \
  60.   if (TARGET_29050)                        \
  61.     fprintf (FILE, "\t.cputype 29050\n");            \
  62.   for (p = main_input_filename; *p; p++)            \
  63.     if (*p == '/')                        \
  64.       after_dir = p + 1;                    \
  65.   fprintf (FILE, "\t.file ");                    \
  66.   output_quoted_string (FILE, after_dir);            \
  67.   fprintf (FILE, "\n");                        \
  68.   if (flag_shared_data)                        \
  69.     fprintf (FILE, "\t.sect .shdata,data\n");            \
  70.   fprintf (FILE, "\t.sect .lit,lit\n");  }
  71.  
  72. /* Output before shared  data.  */
  73.  
  74. #define SHARED_SECTION_ASM_OP "\t.use .shdata"
  75.  
  76. /* If we want shared data, we have to turn off commons.  */
  77.  
  78. #define OVERRIDE_OPTIONS if (flag_shared_data) flag_no_common = 1;
  79.  
  80. /* Default to -fno-pcc-struct-return, since we don't have to worry about
  81.    compatibility.  */
  82. #define DEFAULT_PCC_STRUCT_RETURN 0
  83.  
  84. #if 0 /* This would be needed except that the 29k doesn't have strict
  85.      alignment requirements.  */
  86.  
  87. #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)                \
  88.   (((TYPE) != 0)                            \
  89.     ? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY)                \
  90.         ? PARM_BOUNDARY                        \
  91.         : TYPE_ALIGN(TYPE))                    \
  92.     : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)            \
  93.         ? PARM_BOUNDARY                        \
  94.         : GET_MODE_ALIGNMENT(MODE)))
  95. #endif
  96.